import { BrowserModule } from '@angular/platform-browser';
import { NgModule } from '@angular/core';
import { Routes, RouterModule } from '@angular/router'

import { NgZorroAntdModule, NZ_I18N, zh_CN } from 'ng-zorro-antd'
import { AppComponent } from './app.component';
import { BrowserAnimationsModule } from '@angular/platform-browser/animations';
import { FormsModule } from '@angular/forms';
import { HttpClientModule } from '@angular/common/http';
import { registerLocaleData } from '@angular/common';
import zh from '@angular/common/locales/zh';
import { OrderComponent } from './order/order.component';
import { PriceQuoteComponent } from './price-quote/price-quote.component';
import { ChildComponent } from './child/child.component';
import { BackComponent } from './back/back.component';

registerLocaleData(zh);
const routerConfig: Routes = [{ path: '', pathMatch: 'full', redirectTo: '/child' },
  { path: 'child', component: ChildComponent },
  { path: 'order', component: OrderComponent },
  { path: 'back', component: BackComponent }];

@NgModule({
  declarations: [
    AppComponent,
    OrderComponent,
    PriceQuoteComponent,
    ChildComponent,
    BackComponent,
  ],
  imports: [
    RouterModule.forRoot(routerConfig),
    BrowserModule,
    NgZorroAntdModule.forRoot(),
    BrowserAnimationsModule,
    FormsModule,
    HttpClientModule,
    NgZorroAntdModule
  ],
  providers: [{ provide: NZ_I18N, useValue: zh_CN }],
  bootstrap: [AppComponent]
})
export class AppModule { }
